cmake_minimum_required(VERSION 3.8)
project(dir_prop_get)

#define_property(DIRECTORY PROPERTY my_dir_prop BRIEF_DOCS "brief docs" FULL_DOCS "full docs")
#set_property(DIRECTORY PROPERTY my_dir_prop "this is my dir prop value")
set_directory_properties(PROPERTIES my_dir_prop "new my dir prop value")

get_property(var1 DIRECTORY PROPERTY my_dir_prop DEFINED)
message(STATUS "my_dir_prop is defined? = ${var1}")
get_property(var2 DIRECTORY PROPERTY my_dir_prop SET)
message(STATUS "my_dir_prop is set? = ${var2}")
get_property(var3 DIRECTORY PROPERTY my_dir_prop BRIEF_DOCS)
message(STATUS "my_dir_prop brief docs = ${var3}")
get_property(var4 DIRECTORY PROPERTY my_dir_prop FULL_DOCS)
message(STATUS "my_dir_prop full doc  = ${var4}")
get_property(var5 DIRECTORY PROPERTY my_dir_prop)
message(STATUS "my_dir_prop = ${var5}")

get_directory_property(var6 my_dir_prop)
message(STATUS "my_dir_prop = ${var6}")

set(my_var "my var value")
get_directory_property(var7 DEFINITION my_var)
message(STATUS "my_var = ${var7}")
